This application claims priority to Korean Patent Application No. 2001-22546, filed on Apr. 26, 2001, the contents of which are herein incorporated by reference in their entirety.
The present invention generally relates to integrated circuit devices and, more specifically, to a circuit for resetting a microcontroller.
Portable electronic devices such as notebook computers, personal digital assistants (PDA), cellular phones, portable CD players, etc., occasionally undergo such a state that a power supply voltage exceeds or falls below an operating voltage range. Such portable electronic devices usually include a microcontroller. When the power supply voltage applied to the microcontroller deviates from an operating voltage range, the microcontroller can be in an unknown state, thus causing unpredictable behavior.
Various approaches have been developed to solve such a problem. One known approach includes using a low voltage detector in a portable electronic device. The low voltage detector incorporated in the electronic device senses or detects whether the power supply voltage falls below a predetermined threshold voltage, and then outputs a signal for resetting or halting the microcontroller, thereby preventing the microcontroller from malfunctioning. After the microcontroller enters the halt state, if the power supply voltage is gradually increased and reaches the predetermined threshold voltage, the low voltage detector generates a pulse signal to reset the microcontroller.
In general, the low voltage detector always senses or detects the power supply voltage regardless of an operating state of the microcontroller. Even though the microcontroller is in a stop or halt mode, in which the microcontroller does not operate, the low voltage detector continues to sense or detect whether the power supply voltage deviates from the predetermined threshold voltage. This means that unnecessary power for the low voltage detector continues to be consumed during the microcontroller stop or halt mode. Thus, it is desirable to minimize unnecessary power consumption for the electronic devices.
It is therefore an object of the present invention to provide a circuit for resetting a microcontroller capable of preventing the circuit from consuming power when the microcontroller enters into a halt mode.
According to an aspect of the present invention, there is provided a circuit for resetting a microcontroller. The circuit comprises a low voltage detector that is configured to be supplied with current from a current source and detects whether a power supply voltage falls below a predetermined threshold voltage. The circuit further comprises means for detecting whether the microcontroller enters into a non-operating state. When the microcontroller enters into the non-operating state, the means for detecting controls the current source so that no current is supplied to the low voltage detector. The means for detecting comprises an S-R flip-flop that has a set input terminal connected to receive an interrupt signal, a reset terminal connected to receive a halt signal indicating whether the microcontroller operates normally, and an output terminal. When the interrupt signal is activated an output of the S-R flip-flop is set so the current source supplies a current to the low voltage detector. When the halt signal is activated an output of the S-R flip-flop is reset so that no current flows from the current source to the low voltage detector.
According to another aspect of the present invention, a circuit is provided which generates a reset signal for resetting a microcontroller. The circuit comprises a first detector, a second detector, a current source, and a signal generator. The first detector detects whether the microcontroller enters into a halt mode in which the microcontroller does not operate. The second detector detects whether a power supply voltage falls below a predetermined threshold voltage. The current source supplies a current to the second detector in response to an output of the first detector. The signal generator produces the reset signal in response to the output of the first detector and an output of the second detector. When the microcontroller enters into the halt mode the current source is disabled so as to cut off a current from the current source to the second detector. The current source comprises an NMOS transistor having a drain connected to the power supply voltage, a source connected to the second detector, and a gate connected to receive an output of the first detector. A delay is further provided which delays an output of the first detector to apply the delayed output to the gate of the NMOS transistor. The first detector comprises an S-R flip-flop that has a set input terminal connected to receive an interrupt signal, a reset input terminal connected to receive a halt signal indicating whether the microcontroller operates normally, and an output terminal. The signal generator comprises an AND gate that has a first input terminal connected to receive an output of the first detector, a second input terminal connected to receive an output of the second detector, and an output terminal for outputting the reset signal.
According to another aspect of the prevent invention, a method is provided which resets a microcontroller that is comprised in an integrated circuit device having a low voltage detector for detecting whether a power supply voltage falls below a predetermined threshold voltage. The method comprises the steps of detecting whether the microcontroller enters into a halt mode in which the microcontroller does not operate; enabling the low voltage detector when the microcontroller does not enter into the halt mode; and disabling the low voltage detector when the microcontroller enters into the halt mode, wherein the disabled low voltage detector is enabled when an external device generates an interrupt signal.